"""


    PAL Live.Song Mock


"""

class View(object):
    def __init__(self):
        
        self._selected_scene_listener = []
        self._selected_track_listener = []
    
    def add_selected_scene_listener(self, f):
        self._selected_scene_listener.append(f)
    def remove_selected_scene_listener(self, f):
        self._selected_scene_listener.remove(f)
        
    def add_selected_track_listener(self,f):
        self._selected_track_listener.append(f)
    def remove_selected_track_listener(self,f):
        self._selected_track_listener.remove(f)

#    add_detail_clip_listener
#    add_draw_mode_listener
#    add_follow_song_listener
#    detail_clip
#    detail_clip_has_listener
#    draw_mode
#    draw_mode_has_listener
#    follow_song
#    follow_song_has_listener
#    highlighted_clip_slot
#    remove_detail_clip_listener
#    remove_draw_mode_listener
#    remove_follow_song_listener
#    select_device
#    selected_scene
#    selected_scene_has_listener
#    selected_track
#    selected_track_has_listener

_Song = None
    
class Song(object):
    def __init__(self):
        self.view = View()
        self.tracks = []
        
        self._scenes_listener = []
        self._tracks_listener = []
    
    def add_scenes_listener(self,f):
        self._scenes_listener.append(f)
    def remove_scenes_listener(self,f):
        self._scenes_listener.remove(f)
        
    def add_tracks_listener(self,f):
        self._tracks_listener.append(f)
    def remove_tracks_listener(self,f):
        self._tracks_listener.remove(f)
        
def get_song():
    global _Song
    if _Song is None:
        _Song = Song()
    return _Song
